package tests;

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNext()){
            int a = scanner.nextInt();
            int count = 0;
            int i = a;
            while(i!=0){
                if ((i&1) == 1){
                    count++;
                }
                i = i >> 1;
            }
            System.out.println(count);
        }
    }
}
